package cn.pegasus.teamwork.manager.controller;

import cn.iyizhan.teamwork.base.controller.BaseController;
import cn.pegasus.teamwork.manager.entity.SysUcenterAdmin;

/** 
 * @ClassName: BaseManagerController
 * @Description: manager项目的父类
 * @author buyuer
 * @date 2015年11月12日 下午5:05:06
 * 
 */
public class BaseManagerController<T, E> extends BaseController<T, E> {
    /**
     * 
     * @author buyuer
     * @Title: getAdmin
     * @Description: 获取admin
     */
    public SysUcenterAdmin getAdmin() {
        SysUcenterAdmin admin = (SysUcenterAdmin) getSessionAttr("admin");
        if (admin != null) {
            return admin;
        }
        return null;
    }

    /**
     * 
     * @author buyuer
     * @Title: setAdmin
     * @Description: 将admin存入session
     */
    public void setAdmin(SysUcenterAdmin admin) {
        getSession().setAttribute("admin", admin);
    }
    
}
